{template 'common/header'}
<ul class="nav nav-tabs">
        <li><a href="{php echo $this->createWebUrl('activity', array('op' => 'list'));}">活动管理</a>
        </li>
        <li><a href="{php echo $this->createWebUrl('activity', array('op' => 'add'));}">创建活动</a>
        </li>
        <li class="active"><a href="{php echo $this->createWebUrl('activity', array('op' => 'order'));}">报名管理</a>
        </li>
    </ul>
    <div class="panel panel-info">
        <div class="panel-heading">筛选</div>
        <div class="panel-body">
            <form action="" method="post" class="form-horizontal" role="form">
                <div class="form-group">
                    <label class="col-xs-12 col-sm-2 col-md-2 control-label">关键字</label>
                    <div class="col-sm-8 col-md-8 col-lg-8 col-xs-12">
                        <input class="form-control" name="keyword" id="" type="text" value="{$_GPC['keyword']}">
                    </div>
                </div>
                <div class="form-group">
                    <div class="pull-right col-xs-12 col-sm-2 col-md-2 col-lg-2">
                        <button class="btn btn-default"><i class="fa fa-search"></i> 搜索</button>
                    </div>
                </div>
            </form>
        </div>
    </div>
    <form action="" method="post">
        <div style="padding:15px;">
            <table class="table table-striped">
                <thead class="navbar-inner">
                    <tr>
                        <th style="width:5%;">选择</th>
                        <th style="width:10%;">活动标题</th>
                        <th style="width:10%;">报名姓名</th>
                        <th style="width:15%;">报名电话</th>
                        <th style="width:10%;">报名数量</th>
                        <th style="width:30%;">报名时间</th>
                        <th style="width:20%;">支付状态</th>
                    </tr>
                </thead>
                <tbody>
                    {loop $list $item}
                    <tr>
                        <td>
                            <input type="checkbox" name="select[]" value="{$item['id']}" id='select' data-group ="select"/>
                        </td>
                        <td>{$item['title']}</td>
                        <td>{$item['truename']}</td>
                        <td>{$item['mobile']}</td>
                        <td>{$item['num']}</td>
                        <td>{php echo date('Y-m-d H:i:s', $item[createtime]);}</td>
                        <td>
                            {if $item['price'] != '0.00'} {if $item['status']}<span class="label label-success">支付成功</span>{else} <span class="label label-default">未支付</span>{/if}{else}无定金{/if}
                        </td>
                    </tr>
                    {/loop}
                </tbody>
            </table>
            {$pager}
            <table class="table">
                <tr>
                    {if !empty($list)}
                    <td style="width:40px;" class="row-first">
                        <input type="checkbox" id='checkAll' data-group="select"/>
                    </td>
                    <td>
                        <input type="submit" name="delete" value="删除" class="btn btn-primary" />
                        <input type="hidden" name="token" value="{$_W['token']}" />
                    </td>
                    {/if}
                </tr>
            </table>
    </form>
    </div>

<script type="text/javascript">

$(function() {
             $("#checkAll").click(function() {

                    var checked = $(this).get(0).checked;
                    var group = $(this).data('group');
                    $("#select[data-group='" +group + "']").each(function(){
                        $(this).get(0).checked = checked;
                    })

             });
        });
</script>
{template 'common/footer'}